<div class="form">
<div class="note text-center">
	<h2>Title Here</h2>
	<p class="note">Note here!</p>
</div>
<?php echo CHtml::beginForm()?>
<?php 
	$session = Yii::app()->session;
    $prefixLen = strlen(CCaptchaAction::SESSION_VAR_PREFIX);
    foreach ($session->keys as $key) {
        if (strncmp(CCaptchaAction::SESSION_VAR_PREFIX, $key, $prefixLen) == 0)
            $session->remove($key);
    }
?>
<p class="note message-note"><span class="glyphicon glyphicon-info-sign"></span> Các ô có dấu <span class="required">*</span> là bắt buộc.</p>
	<div class="row" id="div-contentck">
		<span>Nội dung: </span>
   		<?php //echo CHtml::encode($model, array('label'=>'Nội dung', 'for'=>'content_send')); ?>
		<?php echo CHtml::activeTextArea($model, 'content', array('rows' => 6, 'name'=>'content', 'id'=>'content_send', 'class'=>'form-control'))?>
		<div id="err-content"></div>
	</div>
   	<div class="row" id="div-captchack">
   		<!--<?php 
   		$verifyCodetext = 'black-text';
   		// if($this->errCaptcha)
   			// $verifyCodetext = 'text-error';
   		// echo $form->labelEx($model,'verifyCode', array('label'=>'Xác thực <span class="required">*</span>', 'for'=>'verifyCode', 'class'=>$verifyCodetext)); ?>
	   <div name="verify" id="verifyCode" class="g-recaptcha" data-sitekey="6LfKr_8SAAAAADufc-crX7NC3GSNpJnT9EwOkq_T"></div>  -->


	   <?php if(CCaptcha::checkRequirements()):?>
                
		<div class="row">
			<span> Mã xác thực: </span>
			<?php //echo CHtml::encode($model,'verifyCode'); ?>
			<div>
				<?php $this->widget('CCaptcha'); ?><br/>
				<?php echo CHtml::activeTextField($model,'verifyCode', array('id'=>'verifyCode', 'name'=> 'captcha')); ?>
			</div>
			<div id="err-captcha"></div>
		</div>
	<?php endif; ?>
	</div>
   <div class="row buttons">
		<?php echo CHtml::button('Gửi ngay', array('class'=>'btn btn-primary', 'name'=>'submit', 'id'=>'sendButton')); ?>
	</div>

<?php echo CHtml::endForm() ?>
</div>
<script type="text/javascript">
$(document).ready(function(){
	$(document).on('click','#sendButton', function(e){
		e.preventDefault();
		var content	= $('#content_send').val();
		var url = '<?php echo Yii::app()->createUrl("Send/SendText") ?>';
		getSend(url, content);
	});
})
</script>